Integrand size = 24, antiderivative size = 69 \[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {3 a^2 \sin (c+d x)}{5 d}-\frac {a^2 \sin ^3(c+d x)}{5 d}-\frac {2 i \cos ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{5 d} \]
[Out]
Time = 0.06 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3577, 2713} \[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=-\frac {a^2 \sin ^3(c+d x)}{5 d}+\frac {3 a^2 \sin (c+d x)}{5 d}-\frac {2 i \cos ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{5 d} \]
[In]
[Out]
Rule 2713
Rule 3577
Rubi steps \begin{align*} \text {integral}& = -\frac {2 i \cos ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{5 d}+\frac {1}{5} \left (3 a^2\right ) \int \cos ^3(c+d x) \, dx \\ & = -\frac {2 i \cos ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{5 d}-\frac {\left (3 a^2\right ) \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{5 d} \\ & = \frac {3 a^2 \sin (c+d x)}{5 d}-\frac {a^2 \sin ^3(c+d x)}{5 d}-\frac {2 i \cos ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{5 d} \\ \end{align*}
Time = 0.13 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.99 \[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=-\frac {2 i a^2 \cos ^5(c+d x)}{5 d}+\frac {a^2 \sin (c+d x)}{d}-\frac {a^2 \sin ^3(c+d x)}{d}+\frac {2 a^2 \sin ^5(c+d x)}{5 d} \]
[In]
[Out]
Time = 14.24 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.97
method | result | size |
risch | \(-\frac {i a^{2} {\mathrm e}^{5 i \left (d x +c \right )}}{40 d}-\frac {i a^{2} {\mathrm e}^{3 i \left (d x +c \right )}}{8 d}-\frac {i a^{2} \cos \left (d x +c \right )}{4 d}+\frac {a^{2} \sin \left (d x +c \right )}{2 d}\) | \(67\) |
derivativedivides | \(\frac {-a^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{15}\right )-\frac {2 i a^{2} \left (\cos ^{5}\left (d x +c \right )\right )}{5}+\frac {a^{2} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}}{d}\) | \(91\) |
default | \(\frac {-a^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{15}\right )-\frac {2 i a^{2} \left (\cos ^{5}\left (d x +c \right )\right )}{5}+\frac {a^{2} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}}{d}\) | \(91\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.90 \[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {{\left (-i \, a^{2} e^{\left (6 i \, d x + 6 i \, c\right )} - 5 i \, a^{2} e^{\left (4 i \, d x + 4 i \, c\right )} - 15 i \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + 5 i \, a^{2}\right )} e^{\left (-i \, d x - i \, c\right )}}{40 \, d} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 153 vs. \(2 (60) = 120\).
Time = 0.23 (sec) , antiderivative size = 153, normalized size of antiderivative = 2.22 \[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=\begin {cases} \frac {\left (- 512 i a^{2} d^{3} e^{6 i c} e^{5 i d x} - 2560 i a^{2} d^{3} e^{4 i c} e^{3 i d x} - 7680 i a^{2} d^{3} e^{2 i c} e^{i d x} + 2560 i a^{2} d^{3} e^{- i d x}\right ) e^{- i c}}{20480 d^{4}} & \text {for}\: d^{4} e^{i c} \neq 0 \\\frac {x \left (a^{2} e^{6 i c} + 3 a^{2} e^{4 i c} + 3 a^{2} e^{2 i c} + a^{2}\right ) e^{- i c}}{8} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.14 \[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=-\frac {6 i \, a^{2} \cos \left (d x + c\right )^{5} - {\left (3 \, \sin \left (d x + c\right )^{5} - 5 \, \sin \left (d x + c\right )^{3}\right )} a^{2} - {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} a^{2}}{15 \, d} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 613 vs. \(2 (59) = 118\).
Time = 0.60 (sec) , antiderivative size = 613, normalized size of antiderivative = 8.88 \[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=-\frac {45 \, a^{2} e^{\left (5 i \, d x + 3 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 90 \, a^{2} e^{\left (3 i \, d x + i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 45 \, a^{2} e^{\left (i \, d x - i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 40 \, a^{2} e^{\left (5 i \, d x + 3 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) + 80 \, a^{2} e^{\left (3 i \, d x + i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) + 40 \, a^{2} e^{\left (i \, d x - i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 45 \, a^{2} e^{\left (5 i \, d x + 3 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 90 \, a^{2} e^{\left (3 i \, d x + i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 45 \, a^{2} e^{\left (i \, d x - i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 40 \, a^{2} e^{\left (5 i \, d x + 3 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 80 \, a^{2} e^{\left (3 i \, d x + i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 40 \, a^{2} e^{\left (i \, d x - i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 5 \, a^{2} e^{\left (5 i \, d x + 3 i \, c\right )} \log \left (i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) - 10 \, a^{2} e^{\left (3 i \, d x + i \, c\right )} \log \left (i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) - 5 \, a^{2} e^{\left (i \, d x - i \, c\right )} \log \left (i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 5 \, a^{2} e^{\left (5 i \, d x + 3 i \, c\right )} \log \left (-i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 10 \, a^{2} e^{\left (3 i \, d x + i \, c\right )} \log \left (-i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 5 \, a^{2} e^{\left (i \, d x - i \, c\right )} \log \left (-i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 4 i \, a^{2} e^{\left (10 i \, d x + 8 i \, c\right )} + 28 i \, a^{2} e^{\left (8 i \, d x + 6 i \, c\right )} + 104 i \, a^{2} e^{\left (6 i \, d x + 4 i \, c\right )} + 120 i \, a^{2} e^{\left (4 i \, d x + 2 i \, c\right )} + 20 i \, a^{2} e^{\left (2 i \, d x\right )} - 20 i \, a^{2} e^{\left (-2 i \, c\right )}}{160 \, {\left (d e^{\left (5 i \, d x + 3 i \, c\right )} + 2 \, d e^{\left (3 i \, d x + i \, c\right )} + d e^{\left (i \, d x - i \, c\right )}\right )}} \]
[In]
[Out]
Time = 5.11 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.03 \[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {2\,a^2\,\left (\frac {5\,\sin \left (3\,c+3\,d\,x\right )}{16}-\frac {\cos \left (5\,c+5\,d\,x\right )\,1{}\mathrm {i}}{16}-\frac {\cos \left (3\,c+3\,d\,x\right )\,5{}\mathrm {i}}{16}+\frac {\sin \left (5\,c+5\,d\,x\right )}{16}+\frac {5\,\sqrt {3}\,\sin \left (c+d\,x-\frac {\ln \left (3\right )\,1{}\mathrm {i}}{2}\right )}{8}\right )}{5\,d} \]
[In]
[Out]